package com.bc.bcmodel.req;

import com.bc.bcmodel.Entity;
import com.bc.commoncore.util.DataUtils;
import com.bc.commoncore.util.StringUtils;
import com.bc.commonentity.enums.HttpReturnRnums;

/**
 * Created by lianzerong on 2018/8/22.
 */
public class UserLogonReq extends Entity {

    private static final long serialVersionUID = -6489853114356260647L;

    private String email;
    private String passWd;
    private String vcode;

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassWd() {
        return passWd;
    }

    public void setPassWd(String passWd) {
        this.passWd = passWd;
    }

    public String getVcode() {
        return vcode;
    }

    public void setVcode(String vcode) {
        this.vcode = vcode;
    }

    public HttpReturnRnums paramsCheck() {
        if (!DataUtils.isEmail(getEmail())) {
            return HttpReturnRnums.ParaError;
        }
        if (StringUtils.isEmpty(getPassWd())) {
            return HttpReturnRnums.PASSWD_IS_EMPTY;
        }
//        if (StringUtils.isEmpty(getVcode())) {
//            return HttpReturnRnums.VCODE_IS_EMPTY;
//        }
        return HttpReturnRnums.Success;
    }

}
